/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.sbbs.demo.dao;

import javax.annotation.PostConstruct;
import javax.inject.Named;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import org.sbbs.dao.BaseJPADaoImpl;
import org.sbbs.demo.entity.DemoEntity;

/**
 *
 * @author Administrator
 */
@Named
public class DemoEntityDaoImpl extends BaseJPADaoImpl<DemoEntity, Long> implements DemoEntityDao {

    @PersistenceContext(unitName = "SBBS")
    private EntityManager em;

    @PostConstruct
    public void init() {
        this.init(em);
    }

    @Override
    public DemoEntity findByStringId(String id) {
        return this.find(Long.parseLong(id));
    }

}
